<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      body {
        background: #000;
      }

      header {
        color: rgba(67, 175, 217, 1);
        font-size: 32px;
      }
    </style>
  </head>

  <body>
    <header id="title">SDA示云智图</header>
  </body>
  <script>
    console.log("Iframe元素加载");
    // 平台数据对接方式示例（需在script标签中编写）:
    window.onload = () => {
      console.log("获取平台SDA修改的数据");
      // 3.接收到信息的业务逻辑
    };

    window.onmessage = function (e) {
      console.info("接收到來自SDA的平台信息: ", e);
      var titleEle = document.getElementById("title");
      titleEle.innerText = e.data.name;
    };
  </script>
</html>
